package org.cfk.delaytasktutorial.service;

import org.cfk.delaytasktutorial.entity.LazyJob;
import org.cfk.delaytasktutorial.enums.LazyJobLazyLevel;

import java.time.LocalDateTime;
import java.util.List;

public interface LazyJobService {
    /**
     * 添加延迟任务
     */
    void add(String worker, String content, LocalDateTime util, LazyJobLazyLevel level);

    /**
     * 获取待执行的任务
     */
    List<LazyJob> poll();

    /**
     * 根据ID删除任务
     */
    void deleteById(Long id);
}